package com.project.easy.common.util.enums.exception;

import com.project.easy.common.util.enums.BaseEnums;

/**
 * @author GreatorMan.cool
 * @copyright: Copyright (c) 2020
 * @company: 扬起科技有限公司
 * @date 2021/10/9 21:29
 * @description:
 */
public enum ValidatorExceptionEnums implements BaseEnums {
    VALIDATOR_PARAM_ILLEGAL(ExceptionEnums.PARAM_ILLEGAL,  "501",  "自动验证参数异常",  501);
    /**
     * 编码
     */
    private String code;
    /**
     * 消息
     */
    private String msg;
    /**
     * 值
     */
    private int value;
    /**
     * 父级异常
     */
    private ExceptionEnums parentException;

    public ExceptionEnums getParentException() {
        return parentException;
    }

    ValidatorExceptionEnums(ExceptionEnums exceptionEnums, String code, String msg, int value) {
        this.parentException = exceptionEnums;
        this.code = code;
        this.msg = msg;
        this.value = value;
    }
    /**
     * 获取编码
     *
     * @return 编码
     */
    @Override
    public String getCode() {
        return code;
    }

    /**
     * 获取名称
     *
     * @return 名称
     */
    @Override
    public String getName() {
        return name();
    }

    /**
     * 枚举值
     *
     * @return 枚举值
     */
    @Override
    public int getValue() {
        return 0;
    }
}
